-
Notifications
You must be signed in to change notification settings - Fork 985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for "no routes found" on transaction confirmation page #19789
Conversation
Jenkins BuildsClick to see older builds (13)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all good by me, but for sure @briansztamfater's input here would be great 🙏
(> (controlled-input/numeric-value input-state) | ||
(current-limit))))) | ||
current-limit (if @crypto-currency? crypto-limit fiat-limit) | ||
valid-input? (not (or (empty? (controlled-input/input-value input-state)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty?
Won't detect whitespace
Better to use clojure.string/blank?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ibrkhalil, fixed)
(<= (controlled-input/numeric-value input-state) 0) | ||
(> (controlled-input/numeric-value input-state) | ||
(current-limit))))) | ||
current-limit (if @crypto-currency? crypto-limit fiat-limit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Current limit is no longer a function because it don't need to be
[input-value routes-can-be-fetched?]) | ||
#(when (and active-screen? (> (count affordable-networks) 0)) | ||
(fetch-routes input-value valid-input? 2000)) | ||
[input-value valid-input?]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually need to react to valid-input?
? I think passing only input-value
would be okay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, theoretically we can remove it because we know that input validity depends only on input value. But that is kind of knowledge that we have outside of the component. If for some reason the validity rule will change, not having valid-input? as a dependency can cause an error
@@ -202,18 +202,20 @@ | |||
:on-press-to-network on-press-to-network}])) | |||
|
|||
(defn fetch-routes | |||
[amount routes-can-be-fetched? bounce-duration-ms] | |||
(if routes-can-be-fetched? | |||
[amount valid-input? bounce-duration-ms] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function was the cause of the problem. It was getting too generic condition routes-can-be-fetched?
that was made from two logical conditions - if the valid is input and if we are still on the routes screen.
And when user navigated to confirmation page that condition became false which lead to clearing suggested routes.
Now in this function we rely only on input validity. And when the screen is wrong we dont't even call it.
(set-input-state #(controlled-input/set-upper-limit % (current-limit)))) | ||
[@crypto-currency?]) | ||
(set-input-state #(controlled-input/set-upper-limit % current-limit))) | ||
[current-limit]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now limit updated correctly.
d5432d9
to
af4ebcd
Compare
92% of end-end tests have passed
Failed tests (2)Click to expandClass TestWalletMultipleDevice:
Expected to fail tests (2)Click to expandClass TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityOneDeviceMerged:
Passed tests (48)Click to expandClass TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestDeepLinksOneDevice:
Class TestActivityMultipleDevicePR:
Class TestCommunityMultipleDeviceMerged:
Class TestWalletOneDevice:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestActivityMultipleDevicePRTwo:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestCommunityOneDeviceMerged:
|
@pavloburykh, I believe that @mmilad75 fixed other causes of similar issue, no interference here. Plus I believe that PR should be rebased to take into account latest refactoring. @mmilad75, could you please take a look? |
Hi @vkjr, thank you for the fixes. The route fetching on the confirm page is now working correctly. The red highlight issue has also been resolved and not reproduced on real devices. However, it is still shown in Android Studio. Is this an Android Studio limitation and such issue is related only to Android Studio, or could the issue still exist on some devices? Devices:Android Studio Pixel XL API 33 |
@VolodLytvynenko, don't know regarding Android Studio, let me check the code to get some guesses) |
af4ebcd
to
c018aed
Compare
92% of end-end tests have passed
Failed tests (2)Click to expandClass TestActivityCenterContactRequestMultipleDevicePR:
Class TestWalletMultipleDevice:
Expected to fail tests (2)Click to expandClass TestCommunityOneDeviceMerged:
Class TestGroupChatMultipleDeviceMergedNewUI:
Passed tests (48)Click to expandClass TestDeepLinksOneDevice:
Class TestActivityCenterContactRequestMultipleDevicePR:
Class TestCommunityMultipleDeviceMergedTwo:
Class TestGroupChatMultipleDeviceMergedNewUI:
Class TestOneToOneChatMultipleSharedDevicesNewUiTwo:
Class TestOneToOneChatMultipleSharedDevicesNewUi:
Class TestActivityMultipleDevicePR:
Class TestCommunityOneDeviceMerged:
Class TestWalletOneDevice:
Class TestWalletMultipleDevice:
Class TestActivityMultipleDevicePRTwo:
Class TestCommunityMultipleDeviceMerged:
|
c018aed
to
23a86d5
Compare
@VolodLytvynenko , thank you! |
fixes #19780
Summary
This pr fixes:
Screen.Recording.2024-04-24.at.18.18.39.mov
Steps to test
status: ready